import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import{ resolve } from 'path'
// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    port: 3303,
    host: true,
    open: true,
    proxy: {

      '/api': {
        target: 'http://localhost:8484',
        changeOrigin: true,
        rewrite: (p) => p.replace(/^\/api/, '')
      }
    }
  },
  resolve:{
    alias:{
      '@': resolve(__dirname, './src'), // 配置 @ 指向 src 目录
    },
  }

})
